package com.richpay.basejava.base13.factory;

public class TestDemo {
    public static void main(String[] args) {
        // String type = "worker";
        //String type = "peasant";
        String type = "doctor";
        //String type = "test";
        Person person = SimpleFactory.getInstance(type);
        print(person);
    }

    private static void print(Person person) {
        person.eat();
        person.sleep();
        person.talk();
    }

}
